package com.tianji.promotion.service;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.domain.po.ExchangeCode;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.promotion.domain.query.CodeQuery;
import com.tianji.promotion.enums.ExchangeCodeStatus;

import java.time.LocalDateTime;

/**
 * <p>
 * 兑换码 服务类
 * </p>
 *
 * @author xjs
 */
public interface IExchangeCodeService extends IService<ExchangeCode> {

    PageDTO<ExchangeCode> pageQuery(CodeQuery query);

    void updateExchangeCode(long id, Long userId, ExchangeCodeStatus used);

    void asyncGenerateCode(Long id, LocalDateTime issueEndTime, Integer totalNum);

    void deleteByCouponId(Long id);
}
